//,editrules:{required:true,number:true,minValue:0,maxValue:1} 数字
$(function() {
	var initData = $("#initData").val();
	var ss = initData.split(",");
	initLoad(ss);
});

function initLoad(ss) {
	var cols = ['ID', '角色', '操作'];
	var models = [{
		name: 'id',
		index: 'id',
		width: 200,
		fixed: true,
		key: true,
		search: false,
		editable: false,
		editoptions: {
			readonly: true
		}
	},
	{
		name: 'role',
		index: 'role',
		searchoptions: {
			'sopt': ['cn']
		},
		editable: true,
		editrules: {
			edithidden:true,
			required:true
		},
		editoptions: {
			size: 15
		}
	},
	{
		name: 'opt',
		index: 'id',
		width: 40,
		search: false,
		formatter: function(cv, op, rb) {
			var html = '<a href="/master/role/ress/' + rb.id + '" class="btn btn-info  btn-xs">菜单配置</a>&nbsp;';
			return html;
		}
	}];

    var datas = {
        "sortorder": "ASC",
        "sortname":""
    };
	loadData("/master/role", "tabdiv", datas, cols, models);
}
